import request from '@/utils/request'
// 登录方法 密码登录
export function login(username, password,uuid) {
    const data = {
        username,
        password,
        uuid
    }
    return request({
        url: '/auth/login',
        method: 'post',
        data: data
    })
}
// 查询部门列表带分页
export function listorgpage(params) {
    return request({
      url: '/system/org/pageOrg',
      method: 'get',
      params:params
    })
  }
// 登录 验证码
export function loginCode(data) {
    return request({
        url: '/auth/smsLogin',
        method: 'post',
        data
    })
}
// 获取验证码
export function smsCode(data) {
    return request({
        url: '/resource/sms/code',
        method: 'get',
        data
    })
}


// 获取用户详细信息
export function getInfo() {
    return request({
        url: '/system/user/getInfo',
        method: 'get'
    })
}
// 收文流转列表
export function getReceivdocList(data) {
    return request({
        url: '/platform/innerIssue/listFlow',
        method: 'get',
        data
    })
}
// 流转对象列表
export function getWanderList(data) {
    return request({
        url: '/platform/innerIssue/handlers',
        method: 'get',
        data
    })
}
// 办学单位 公文接收的流转 流转对象列表
export function getissueHandlers(data) {
    return request({
        url: '/platform/issue/handlers',
        method: 'get',
        data
    })
}
// 查看公文 详情
export function getWanderDetail(id) {
    return request({
        url: `/platform/innerIssue/${id}`,
        method: 'get',
    })
}
//公文类型下拉数据
export function getbumph_type() {
    return request({
        url: `/system/dict/data/type/bumph_type`,
        method: 'get',
    })
}
//预览
export function prevPdf(url) {
    return request({
        url: '/resource/oss/office?path=' + url + '&base64=1',
        method: 'get',
        // responseType: 'blob',
        // responseType: "arraybuffer",
        // headers: {
        //     'Content-Type': 'application/pdf',
        // },

    })
}
//撤销办结
export function revokeFinish(data) {
    return request({
        url: `/platform/innerIssue/revokeFinish`,
        method: 'put',
        data
    })
}
//公文办结
export function ending(data) {
    return request({
        url: `/platform/innerIssue/updateFinish`,
        method: 'put',
        data
    })
}
//请人员 阅 列表
export function whoRead() {
    return request({
        url: `/system/dict/data/type/bumph_feedback`,
        method: 'get',
    })
}

// 收文流转的 公文阅办和流转操作
export function innerIssuereadFlow(data) {
    return request({
        url: `/platform/innerIssue/handlingFlow`,
        method: "put",
        data
    });
}
// 通讯录组织树
export function getBooks() {
    return request({
        url: `/system/address/orgTree`,
        method: "get",
    });
}
// 根据学院查询联系人
export function getBooksDetail(data) {
    return request({
        url: `/system/address/user`,
        method: "get",
        data
    });
}
// 请假报备添加
export function reportAdd(data) {
    return request({
        url: `/manage/oa/out`,
        method: "post",
        data
    });
}



// 获取路由
export const getRouters = () => {
        return request({
            url: '/system/menu/getRouters',
            method: 'get'
        })
    }
    // 请假报备列表
export function getReportList(data) {
    return request({
        url: `/manage/oa/out/own`,
        method: "get",
        data
    });
}
// 代替他人 申请外出报备 的下拉接口
export function getUserList() {
    return request({
        url: `/manage/oa/out/others`,
        method: "get",
    });
}
// 自己 申请外出报备 的下拉接口
export function listOutCheckers() {
    return request({
        url: 'manage/oa/out/checkers',
        method: 'get',
    })
}
// 审核人 所有人列表
export function listIgnoreUser(data) {
    return request({
        url: '/system/user/listIgnore',
        method: 'get',
        data
    })
}



// 收文流转的否决
export function receiveReject(id) {
    return request({
        url: `/platform/innerIssue/rejectFlow/${id}`,
        method: "delete",
    });
}
// 审核人列表
export function getApproveList() {
    return request({
        url: `/manage/oa/out/checkers`,
        method: "get",
    });
}
// 附件上传
export function fileUpload(data) {
    return request({
        url: `/resource/oss/batchUpload`,
        method: "post",
        data
    });
}
// 删除报备列表
export function deleteManage(id) {
    return request({
        url: `/manage/oa/out/${id}`,
        method: "delete",
    });
}
// 外出报备 详情
export function listOutDetail(id) {
    return request({
        url: `/manage/oa/out/${id}`,
        method: "get",
    });
}
// 撤回报备列表
export function revokeManage(id) {
    return request({
        url: `/manage/oa/out/revoke?id=${id}`,
        method: "put",
    });
}
// 外出报备详情
export function manageDetail(id) {
    return request({
        url: `/manage/oa/out/${id}`,
        method: "get",
    });
}
// 外出报备编辑
export function manageEdit(data) {
    return request({
        url: `/manage/oa/out`,
        method: "put",
        data
    });
}
// 外出报备审批列表
export function manageExamineList(data) {
    return request({
        url: `/manage/oa/out/chk`,
        method: "get",
        data
    });
}
// 外出报备审批 通过还是不通过
export function manageExamine(data) {
    return request({
        url: `/manage/oa/out/chk`,
        method: "put",
        data
    });
}
// 新增工作备忘
export function jobForget(data) {
    return request({
        url: `/manage/oa/note`,
        method: "post",
        data
    });
}
// 编辑工作备忘
export function editForget(data) {
    return request({
        url: `/manage/oa/note`,
        method: "put",
        data
    });
}

// 当月报备或者日程记录
export function getnowManage(data) {
    return request({
        url: `/manage/oa/note/day`,
        method: "get",
        data
    });
}
// 个人日程详情
export function getownManageDetail(id) {
    return request({
        url: `/manage/oa/note/${id}`,
        method: "get",
    });
}
// 个人日程删除
export function getownManageDelete(id) {
    return request({
        url: `/manage/oa/note/${id}`,
        method: "delete",
    });
}

// 收文阅办列表
export function getReadList(data) {
    return request({
        url: `/platform/innerIssue/readList`,
        method: "get",
        data
    });
}
// 收文阅办的阅办和流转
export function readHandlingFlow(data) {
    return request({
        url: `/platform/innerIssue/readHandlingFlow`,
        method: "put",
        data
    });
}
// 阅办代理
export function innerIssueSubpList(data) {
    return request({
        url: `/platform/innerIssue/sub/list`,
        method: "get",
        data
    });
}
// 收文阅办下的流转
export function innerIssueproxyHandlingFlow(data) {
    return request({
        url: "/platform/innerIssue/proxyHandlingFlow",
        method: "put",
        data
    });
}
// 公文接收 列表
export function issueoneList(data) {
    return request({
        url: "/platform/issue/oneList",
        method: "get",
        data
    });
}
// 公文接收详情
export function issueinnerDetail(id) {
    return request({
        url: `/platform/issue/flow/${id}`,
        method: "get",
    });
}
// 公文接收阅办
export function issueupdateRead(data) {
    return request({
        url: `/platform/issue/updateRead`,
        method: "put",
        data
    });
}
// 公文接收/通知接收  流转的人员列表
export function userList(data) {
    return request({
        url: `/platform/issue/handlers`,
        method: "get",
        data
    });
}
// 公文接收/通知接收  流转(添加人员)
export function issueAdduser(data) {
    return request({
        url: `/platform/issue/addUser`,
        method: "post",
        data
    });
}

// 通知接收 列表
export function noticereceivingSublist(data) {
    return request({
        url: `/platform/inform/oneList`,
        method: "get",
        data
    });
}
// 通知接收 的查看
export function noticereceiveDetail(id) {
    return request({
        url: `/platform/inform/flow/${id}`,
        method: "get",
    });
}
// 通知接收 的 阅办
export function noticeAddUser(data) {
    return request({
        url: `/platform/inform/updateRead`,
        method: "put",
        data
    });
}



// 登录页面内容
export function listconfiglogin(query) {
    return request({
        url: '/system/config/login',
        method: 'get',
        params: query
    })
}